﻿using System;
using System.Collections.Generic;

namespace YJKStatisticTable.AreaTable.StatisticControler
{
	public class CellInfo
	{
		public string Value
		{
			get
			{
				return this.m_Value;
			}
			set
			{
				this.m_Value = value;
			}
		}

		public List<int> RowIndex
		{
			get
			{
				return this.m_RowIndex;
			}
		}

		public List<int> ColIndex
		{
			get
			{
				return this.m_ColIndex;
			}
		}

		public CellInfo(CellInfo cell)
		{
			this.m_RowIndex.Clear();
			this.m_RowIndex.AddRange(cell.m_RowIndex);
			this.m_ColIndex.Clear();
			this.m_ColIndex.AddRange(cell.m_ColIndex);
			this.m_Value = cell.m_Value;
		}

		public CellInfo(List<int> rowIndex, List<int> colIndex, string value)
		{
			this.m_RowIndex.Clear();
			this.m_RowIndex.AddRange(rowIndex);
			this.m_ColIndex.Clear();
			this.m_ColIndex.AddRange(colIndex);
			this.m_Value = value;
		}

		public CellInfo(int startRowIndex, int rowCount, int startColIndex, int colCount, string value)
		{
			List<int> list = new List<int>();
			for (int i = 0; i < rowCount; i++)
			{
				list.Add(startRowIndex + i);
			}
			List<int> list2 = new List<int>();
			for (int i = 0; i < colCount; i++)
			{
				list2.Add(startColIndex + i);
			}
			this.m_RowIndex.Clear();
			this.m_RowIndex.AddRange(list);
			this.m_ColIndex.Clear();
			this.m_ColIndex.AddRange(list2);
			this.m_Value = value;
		}

		public static CellInfo NewSingleCellInfo(int rowIndex, int colIndex, string value)
		{
			return new CellInfo(new List<int>
			{
				rowIndex
			}, new List<int>
			{
				colIndex
			}, value);
		}

		private List<int> m_RowIndex = new List<int>();

		private List<int> m_ColIndex = new List<int>();

		private string m_Value = "";
	}
}
